import axios from '@/libs/api.request'
let rol = '/oms/merchant/'
// 电子码列表
export const getecodeList = (data) => {
  return axios.request({
    url: rol + 'tpmall/ecode_product/list',
    method: 'post',
    data: data
  })
}
// 合作方管理列表
export const getePartneList = (data) => {
  return axios.request({
    url: rol + 'tpmall/partner/list',
    method: 'post',
    data: data
  })
}
// 添加合作方信息
export const createPartneList = (data) => {
  return axios.request({
    url: rol + 'tpmall/partner/save',
    method: 'post',
    data: data
  })
}
// 单个合作方信息获取
export const getPartnerDetail = (data) => {
  return axios.request({
    url: rol + 'tpmall/partner/get',
    method: 'post',
    data: data
  })
}
// 删除合作方信息
export const delPartnerInfo = (data) => {
  return axios.request({
    url: rol + 'tpmall/partner/delete',
    method: 'post',
    data: data
  })
}
// 合作渠道管理列表
export const getChannelList = (data) => {
  return axios.request({
    url: rol + 'tpmall/channel/list',
    method: 'post',
    data: data
  })
}
// 合作渠道删除
export const delChannelList = (data) => {
  return axios.request({
    url: rol + 'tpmall/channel/delete',
    method: 'post',
    data: data
  })
}
// 查询单个合作方渠道
export const getChannelInfo = (data) => {
  return axios.request({
    url: rol + 'tpmall/channel/get',
    method: 'post',
    data: data
  })
}
// 添加合作方渠道
export const createChannelList = (data) => {
  return axios.request({
    url: rol + 'tpmall/channel/save',
    method: 'post',
    data: data
  })
}
// 电子码产品管理列表
export const geteCodeProductList = (data) => {
  return axios.request({
    url: rol + 'tpmall/ecode_product/list',
    method: 'post',
    data: data
  })
}
// 作废电子码产品
export const invalidCodeProduct = (data) => {
  return axios.request({
    url: rol + 'tpmall/ecode_product/invalid',
    method: 'post',
    data: data
  })
}
// 导出电子码产品
export const ecodeProductExport = (data) => {
  return axios.request({
    url: rol + 'tpmall/ecode_product/export',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}
// 电子码产品添加
export const createEcodeProduct = (data) => {
  return axios.request({
    url: rol + 'tpmall/ecode_product/save',
    method: 'post',
    data: data
  })
}
// 电子码查询
export const lookEcodeDetail = (data) => {
  return axios.request({
    url: rol + 'tpmall/ecode_product/get',
    method: 'post',
    data: data
  })
}
//  延期电子码产品
export const periodEcode = (data) => {
  return axios.request({
    url: rol + 'tpmall/ecode_product/period/change',
    method: 'post',
    data: data
  })
}
// 查询电子码分页列表
export const lookEcodeList =
 (data) => {
   return axios.request({
     url: rol + 'tpmall/ecode/list',
     method: 'post',
     data: data
   })
 }
// 作废电子码
export const invalidEcode = (data) => {
  return axios.request({
    url: rol + 'tpmall/ecode/invalid',
    method: 'post',
    data: data
  })
}
// 导出电子码
export const ecodeExport = (data) => {
  return axios.request({
    url: rol + 'tpmall/ecode/export',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}
